class ResultData {
    constructor(status,msg,data,err) {
        this.err = err;
        this.status = status;
        this.msg = msg;
        this.data = data
    }

    requestResult(ctx){
        let result = {
            status: this.status,
            msg: this.msg,
        }
        if(this.status === 0){
            result.data = this.data
        }
        ctx.body = result
    }
}


module.exports = ResultData;
